﻿<#include "../template/template.ftl"/>
<@template _title="登录">

<div class="row">
    <div class="form-wrapper col-lg-6 col-md-8 col-sm-8 col-lg-offset-4 col-md-offset-2 col-sm-offset-2">
        <h2>登录</h2><br/>
        <form id="login_form" class="form-horizontal" role="form" @submit.prevent="login">
            <div class="form-group">
                <div class="input-group col-lg-6 col-md-8 col-sm-8">
                    <div class="input-group-addon">&nbsp;学&nbsp;&nbsp;号&nbsp;</div>
                    <input type="text" class="form-control" placeholder="学号 不含60" id="username"
                           v-model="userModel.username" minlength="6" maxlength="16" required/>
                </div>
            </div>
            <div class="form-group">
                <div class="input-group col-lg-6 col-md-8 col-sm-8">
                    <div class="input-group-addon">&nbsp;密&nbsp;&nbsp;码&nbsp;</div>
                    <input type="password" class="form-control" placeholder="密码" id="password"
                           v-model="userModel.password" minlength="1" maxlength="32" required/>
                </div>
            </div>
            <div class="form-group">
                <div class="row">
                    <div class="col-md-6 col-sm-4">
                        <button type="submit" class="btn btn-info btn-lg">登录</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<#assign _pagejs>
<!--<script src="https://unpkg.com/vue-resource/dist/vue-resource.min.js"></script>-->
<script src="//cdn.bootcss.com/vue-resource/1.3.3/vue-resource.min.js"></script>
<script src="//cdn.bootcss.com/js-cookie/2.1.4/js.cookie.min.js"></script>
<!--<script src="${base!}/assets/libs/js-cookie/js.cookie-2.1.4.min.js"></script>-->

<script src="${base}/assets/js/login.js"></script>
</#assign>
</@template>